Properly pass iha/itir if data miss occurs when fetching privop (by Matt Chapman)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 18 Nov 2005 16:58:03 +0000 (10:58 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 18 Nov 2005 16:58:03 +0000 (10:58 -0600)
xen/arch/ia64/xen/process.c
xen/arch/ia64/xen/vcpu.c

index cfe91e4ef44da892ebc4af83f8d6dffb50058bbd..a8d5c96c158126acbfc54483d4bf2dc1c01fe778 100644 (file)
@@ -698,13 +698,10 @@ ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr,
        IA64FAULT vector;
        struct domain *d = current->domain;
        struct vcpu *v = current;
-       // FIXME: no need to pass itir in to this routine as we need to
-       // compute the virtual itir anyway (based on domain's RR.ps)
-       // AND ACTUALLY reflect_interruption doesn't use it anyway!
        vector = priv_emulate(current,regs,isr);
        if (vector != IA64_NO_FAULT && vector != IA64_RFI_IN_PROGRESS) {
-               PSCB(current,itir) =
-                       vcpu_get_itir_on_fault(v,PSCB(current,ifa));
+               // Note: if a path results in a vector to reflect that requires
+               // iha/itir (e.g. vcpu_force_data_miss), they must be set there
                reflect_interruption(isr,regs,vector);
        }
 }
index 363d426c7f27a4d798d063024f90c86aa45bea2b..33969d077412a7d1f6598731335597a3476bfad6 100644 (file)
@@ -1186,6 +1186,8 @@ Privileged operation emulation routines
 IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa)
 {
        PSCB(vcpu,ifa) = ifa;
+       PSCB(vcpu,itir) = vcpu_get_itir_on_fault(vcpu,ifa);
+       vcpu_thash(current, ifa, &PSCB(current,iha));
        return (vcpu_get_rr_ve(vcpu,ifa) ? IA64_DATA_TLB_VECTOR : IA64_ALT_DATA_TLB_VECTOR);
 }